#ifndef CHARACTER_H
#define CHARACTER_H

#include "ICharacter.h"
#include "Item.h"
#include <vector>
#include <iostream>

class Character : public ICharacter {
private:
    std::string name;
    std::string description;
    std::vector<Item*> inventory;

protected:
    // These members are protected so subclasses can access them
    unsigned maxHealth;
    unsigned health;
    unsigned attackPower;  // Renamed to attackPower to avoid conflict with method name
    unsigned defense;

public:
    // Constructor
    Character(const std::string& _name, const std::string& _desc, 
             unsigned _health, unsigned _attack, unsigned _defense);
    
    // Destructor
    virtual ~Character();

    // ICharacter interface implementation
    bool isAlive() const override;
    bool takeDamage(unsigned damage) override;
    bool attack(ICharacter& target) override;
    
    // Getters
    std::string getName() const override;
    std::string getDescription() const override;
    unsigned getHealth() const override;
    unsigned getMaxHealth() const override;
    unsigned getAttack() const override;
    unsigned getDefense() const override;
    std::string toString() const override;
    
    // Inventory management
    void addToInventory(Item* item) override;
    void displayInventory() const override;
    
    // Display
    void display() const override;
};

#endif // CHARACTER_H 